classdef AveragePrecision < MultiLabelMetric
    %AVERAGEPRECISION Summary of this class goes here
    %   Detailed explanation goes here
    
    properties
    end
    
    methods
        function [ this ] = AveragePrecision(  )
            if nargin == 0
                this.setName('average_precision');
                return
            end
        end
    end
    
    methods
        function [ result ] = apply( this, Y, Y_hat, Y_out )
            assert(isequal(this.name, 'average_precision'));
            result = AveragePrecision.calc(Y, Y_out);
        end
    end
    
    methods ( Static = true )
        function [ result ] = calc( Y, Y_hat, Y_out )
            result = calcAveragePrecision(Y, Y_out);
        end
    end
    
end

